package com.filldream.fastboot.web.controller.pc;

import com.filldream.fastboot.base.entity.FreightModel;
import com.filldream.fastboot.base.entity.MallCategory;
import com.filldream.fastboot.base.request.pc.mallCategory.AddMallCategorySTO;
import com.filldream.fastboot.common.entity.R;
import com.filldream.fastboot.common.util.TransferUtil;
import com.filldream.fastboot.core.manager.FreightModelManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@Api(tags = "PC-运费模板")
@RestController
@RequestMapping("/pc/freightModel")
public class PcFreightModelController {

    @Autowired
    private FreightModelManager freightModelManager;

    @ApiOperation(value = "添加运费模板")
    @PostMapping("/add")
    public R<FreightModel> add(@RequestBody @Valid AddMallCategorySTO addMallCategory ){
        MallCategory mallCategory = TransferUtil.changeToObj(addMallCategory, MallCategory.class);
//        return mallCategoryManager.add(mallCategory);
        return null;
    }

}
